package com.utils;

import java.io.*;

public class FileOperation {

    String source;

    public FileOperation() {

    }

    public boolean copyFile(String source, String dest) {        
        try {
            File file = new File(source);
            FileInputStream in = new FileInputStream(file);
            FileOutputStream out = new FileOutputStream(dest);
            int data;
            while ((data = in.read()) != -1) {
                out.write((char) data);
            }
            out.flush();
            out.close();
            in.close();
        } catch (IOException e) {
            return false;
        }
        return true;
    }
}
